package com.x.provider.api.customer.service;

import com.x.core.web.api.R;
import com.x.provider.api.customer.constants.ServiceNameConstants;
import com.x.provider.api.customer.model.dto.directory.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;
import java.util.Map;

@FeignClient(contextId = "directoryRpcService", value = ServiceNameConstants.CUSTOMER_SERVICE)
public interface DirectoryRpcService {

    @PostMapping(ServiceNameConstants.DIRECTORY_URL_PREFIX + "/attribute/list")
    R<Map<String, AttributeDTO>> listAttribute(@RequestBody AttributeListReqDTO attributeListReqDTO);

    @PostMapping(ServiceNameConstants.DIRECTORY_URL_PREFIX + "/region/list")
    R<List<RegionDTO>> listRegion(@RequestBody RegionListReqDTO regionListReqDTO);

    @PostMapping(ServiceNameConstants.DIRECTORY_URL_PREFIX + "/attribute/random")
    R<List<AttributeDTO>> randomAttribute(@RequestBody AttributeRandomReqDTO attributeListReqDTO);


}
